package com.fs.sw.service.impl;

import com.fs.sw.dao.RolesRepository;
import com.fs.sw.pojo.Roles;
import com.fs.sw.service.IRolesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
public class RolesServiceImpl implements IRolesService {

    @Autowired
    RolesRepository rolesRepository;

    @Override
    @Transactional
    public void addRoles(){
        Roles r = new Roles();
        r.setRolename("测试1");
        rolesRepository.save(r);
//        throw new RuntimeException();
    }

}
